#pragma once
/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Foundation Framework Class Library
 * Version 2.00
 * 
 * User Enumerator Class
 *      Provides a mechanism for enumerating all the users on the system and thier
 * relative documents directories.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
#include "stdafx.h"
#include "UserPathInfo.h"

using namespace System;
using namespace System::ComponentModel;
using namespace System::Runtime;
using namespace System::Runtime::InteropServices;
using namespace System::Collections::Generic;
using namespace System::Collections::Specialized;
using namespace System::Security;
using namespace System::Security::Principal;
using namespace Microsoft::Win32;

namespace Adaptive
{
	namespace Win32
	{
		/// <summary>
		/// Provides a mechanism for enumerating all the users on the system and thier
		/// relative documents directories.
		/// </summary>
		public ref class UserEnumerator sealed
		{
		public:
			/*--------------------------------------------------------------------------------
			 * Public Methods / Functions
			 *------------------------------------------------------------------------------*/
			#pragma region Public Methods / Functions
			/// <summary>
			/// Gets the list of account names as defined on the local machine.
			/// </summary>
			/// <returns>
			/// A <see cref="StringCollection"/> instance containing the list of user names.
			/// </returns>
			static StringCollection^ LoadUserAccountNames();
			/// <summary>
			/// Gets the list of user paths for all accounts on the system.
			/// </summary>
			/// <returns>
			/// A <see cref="UserPathInfo"/> array containing the list of paths for 
			/// each user.
			/// </returns>
			static array<UserPathInfo^>^ EnumerateUserKeys();
	        #pragma endregion

		private:
			static String^ PATH_KEY				=  "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
			static String^  PATH_CACHE			= "Cache";
			static String^  PATH_COOKIES		= "Cookies";
			static String^  PATH_HISTORY		= "History";
			static String^ PATH_LOCALSETTINGS	= "Local Settings";
			static String^ PATH_RECENT			= "Recent";

			/*--------------------------------------------------------------------------------
			 * Constructor / Dispose / Destructor Methods
			 *------------------------------------------------------------------------------*/
			#pragma region Constructor / Dispose / Destructor Methods
			/// <summary>
			/// Initializes a new instance of the class.
			/// </summary>
			/// <remarks>
			/// This constructor is hidden to prevent instantiation.
			/// </remarks>
			UserEnumerator();
			#pragma endregion
		};
	}
}
